package com.fuxi.cloud.desreport.service.a;

import com.fuxi.cloud.desreport.dao.JimuReportDictItemDao;
import com.fuxi.cloud.desreport.entity.JimuReportDictItem;
import com.fuxi.cloud.desreport.model.JmPage;
import com.fuxi.cloud.desreport.service.IJimuReportDictItemService;
import org.jeecgframework.minidao.pojo.MiniDaoPage;
import org.jeecgframework.minidao.util.SnowflakeIdWorker;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * a
 *
 * @Author: 扫地僧
 * @CreateTime: 2021-05-03
 */
@Service("jimuDictItemServiceImpl")
public class a implements IJimuReportDictItemService {
    @Autowired
    private JimuReportDictItemDao jimuReportDictItemDao;

    public a() {
    }

    @Override
    public List<JimuReportDictItem> selectItemsByMainId(String mainId) {
        return this.jimuReportDictItemDao.selectItemsByMainId(mainId);
    }

    @Override
    public JmPage<JimuReportDictItem> queryPageList(JimuReportDictItem dictItem, Integer pageNo, Integer pageSize) {
        MiniDaoPage var4 = this.jimuReportDictItemDao.getAll(dictItem, pageNo, pageSize);
        JmPage var5 = com.fuxi.cloud.desreport.b.b.a(var4);
        return var5;
    }

    @Override
    public void save(JimuReportDictItem dictItem) {
        dictItem.setId(String.valueOf(SnowflakeIdWorker.generateId()));
        this.jimuReportDictItemDao.insert(dictItem);
    }

    @Override
    public JimuReportDictItem getById(String id) {
        return this.jimuReportDictItemDao.get(id);
    }


    @Override
    public int updateById(JimuReportDictItem dictItem) {
        return this.jimuReportDictItemDao.update(dictItem);
    }

    @Override
    public void removeByIds(List<String> asList) {
        this.jimuReportDictItemDao.removeByIds(asList);
    }

    @Override
    public Integer removeById(String id) {
        return this.jimuReportDictItemDao.delete(id);
    }

    @Override
    public int count(JimuReportDictItem dictItem) {
        return this.jimuReportDictItemDao.count(dictItem);
    }
}

